﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QOrderFrm.aspx.cs" Inherits="WebApp.QOrderFrm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>工作单信息</title>
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.3.2/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.3.2/themes/icon.css">

    <script type="text/javascript" src="js/common.js"></script>

    <script type="text/javascript" src="js/jquery-easyui-1.3.2/jquery-1.8.0.min.js"></script>

    <script type="text/javascript" src="js/jquery-easyui-1.3.2/jquery.easyui.min.js"></script>

    <script type="text/javascript">
        //页面加载
        $(document).ready(function() {
            initData();
            initGrid();
            //doSearch(10, 0);
        });

        function doSearch(pageSize, pageNumber) {
            alert('doSearch(' + pageSize + ',' + pageNumber);
            var params = getParams(pageSize, pageNumber);
            $('#tb').datagrid('reload', params);
        }

        function getParams(pageSize, pageNumber) {
            var cc = $('#qClient').combogrid('getValue');
            var c = '';
            if (cc)
                c = $('#qClient').combogrid('grid').datagrid('getSelected').fullName;
            return $.extend({}, {
                DataType: 'Order',
                deleteFlag: $('#qDeleteFlag').val(),
                orderCode: $('#qCode').val(),
                cCode: $('#qCCode').val(),
                sDate: $('#qSDate').datebox('getValue'),
                eDate: $('#qEDate').datebox('getValue'),
                orderStatus: $('#qOrderStatus').combobox('getValue'),
                agent: $('#qAgent').combogrid('getValue'),
                bizMan: $('#qBizMan').combogrid('getValue'),
                stowageMethod: $('#qStowageMethod').combobox('getValue'),
                clientName: c,
                isDrawback: $('#qDrawBack').val(),
                customsStatus: $('#qCustomsStatus').combobox('getValue'),
                checkOffCode: $('#qCheckOffCode').val(),
                caseCode: $('#qCaseCode').val(),
                pageSize: pageSize,
                pageIndex: pageNumber
            });
        }

        //加载表格datagrid
        function initGrid() {

            //var params = getParams(10, 0);

            //加载数据
            $('#tb').datagrid({
                width: 'auto',
                height: '500',
                striped: true,
                singleSelect: true,
                url: 'JSONHandler.ashx',
                //queryParams: params,
                loadMsg: '数据加载中请稍后……',
                pagination: true,
                rownumbers: true,
                columns: [[
        { field: 'OrderId', title: '编号', align: 'center' },
        { field: 'OrderCode', title: '作业单号', align: 'center' },
        { field: 'CCode', title: '提单号', align: 'center' },
        { field: 'ClientName', title: '委托方', width: 200, align: 'center' },
        { field: 'IsOffer', title: '交单', align: 'center' },
        { field: 'IsCheck', title: '查验', align: 'center' },
        { field: 'IsPass', title: '放行', align: 'center' },
        { field: 'IsNotice', title: '通知', align: 'center' },
        { field: 'OrderStatus', title: '工作状态', align: 'center' },
        { field: 'CustomsStatus', title: '报关状态', align: 'center' },
        { field: 'ApplyDate', title: '申报时间', align: 'center', formatter: Common.DateFormatter },
        { field: 'BizmanName', title: '业务员', align: 'center' },
        { field: 'AgentName', title: '客服', align: 'center' },
        { field: 'PassTime', title: '放行时间', align: 'center', formatter: Common.DateFormatter },
        { field: 'DeleteFlag', title: '取消', align: 'center' }
    ]]
            });

            var p = $('#tb').datagrid('getPager');
            $(p).pagination({
                pageSize: 10, //每页显示的记录条数，默认为10   
                pageList: [10, 20, 30, 40, 50], //可以设置每页记录条数的列表   
                beforePageText: '第', //页数文本框前显示的汉字   
                afterPageText: '页    共 {pages} 页',
                displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录',
                onBeforeRefresh: function() {
                },
                onRefresh: function(pageNumber, pageSize) {
                },
                onChangePageSize: function() {

                },
                onSelectPage: function(pageNumber, pageSize) {
                    doSearch(pageSize, pageNumber);
                }
            });

        }

        function initData() {
            $('#qSDate').datebox('setValue', DateFormatter(new Date().DateAdd('m', -1)));
            $('#qEDate').datebox('setValue', DateFormatter(new Date()));
            $('#qOrderStatus').combobox('reload', 'JSONHandler.ashx?DataType=OrderStatus');

            $('#eOrderDate').datebox('setValue', DateFormatter(new Date()));


            $.getJSON("JSONHandler.ashx?DataType=StowageMethod", function(result) {
                $('#qStowageMethod').combobox('loadData', result);
                $('#eStowageMethod').combobox('loadData', result);
            });

            $.getJSON("JSONHandler.ashx?DataType=CustomsStatus", function(result) {
                $('#qCustomsStatus').combobox('loadData', result);
                $('#eCustomsStatus').combobox('loadData', result);
            });

            $.getJSON("JSONHandler.ashx?DataType=User", function(result) {
                $('#qAgent').combogrid("grid").datagrid("loadData", result);
                $('#eAgent').combogrid("grid").datagrid("loadData", result);
                $('#qBizMan').combogrid("grid").datagrid("loadData", result);
                $('#eBizMan').combogrid("grid").datagrid("loadData", result);
            });

            $.getJSON("JSONHandler.ashx?DataType=Client", function(result) {
                $('#qClient').combogrid("grid").datagrid("loadData", result);
                $('#eClient').combogrid("grid").datagrid("loadData", result);
            });

            $.getJSON("JSONHandler.ashx?DataType=Port", function(result) {
                $('#eStartPort').combobox('loadData', result);
                $('#eEndPort').combobox('loadData', result);
            });

            $.getJSON("JSONHandler.ashx?DataType=ImptAndExpt", function(result) {
                //$('#qImptAndExpt').combogrid("grid").datagrid("loadData", result);
                $('#eImptAndExpt').combobox('loadData', result);
            });

            resetFrm(true);
        }

        function resetAll() {
            $('#qOrderStatus').combobox('clear');
            $('#qAgent').combogrid('clear');
            $('#qOperator').combogrid('clear');
            $('#qClient').combogrid('clear');
            $('#qStowageMethod').combobox('clear');
            $('#qCustomsStatus').combobox('clear');
        }

        function resetFrm(first) {
            if (!first)
                $('#fm').form('clear');
            $('#eOrderDate').datebox('setValue', DateFormatter(new Date()));
            //var res = WebApp.QOrderFrm.GetCurrentUser().value;
            //$('#eBizMan').combogrid('setValue', res);
            //$('#eAgent').combogrid('setValue', res);
        }           
    </script>

    <style type="text/css">
        #fm
        {
            margin: 0;
            padding: 0px;
        }
        .ftitle
        {
            font-size: 14px;
            font-weight: bold;
            padding: 5px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #ccc;
        }
        .fitem
        {
            margin-bottom: 5px;
        }
        .fitem label
        {
            display: inline-block;
            width: 80px;
        }
    </style>
</head>
<body>
<form id="Form1" method="post" runat="server">
    </form>
    <div id="searchBar" style="padding: 5px; height: auto">
        <span>接单时段：</span>
        <input id="qSDate" class="easyui-datebox" data-options="formatter:DateFormatter,parser:DateParser"
            style="width: 100px" />至
        <input id="qEDate" class="easyui-datebox" style="width: 100px" />
        <span>流程状态：</span><input class="easyui-combobox" id="qOrderStatus" data-options="valueField:'Value',textField:'Name'"
            style="width: 100px;">
        <span>装柜形式：</span><input class="easyui-combobox" id="qStowageMethod" data-options="valueField:'id',textField:'name'"
            style="width: 100px;">
        <span>报关状态：</span><input class="easyui-combobox" id="qCustomsStatus" data-options="valueField:'Value',textField:'Name'"
            style="width: 100px;">
        <br />
        <br />
        <span>客服：</span><input class="easyui-combogrid" id="qAgent" style="width: 150px"
            data-options="  
            panelWidth: 150,  
            idField: 'id',  
            textField: 'userName',
            columns: [[   
                {field:'userName',title:'名称',width:150}               
            ]],  
            fitColumns: true  
        ">
        <span>业务：</span><input class="easyui-combogrid" id="qBizMan" style="width: 150px"
            data-options="  
            panelWidth: 150,  
            idField: 'id',  
            textField: 'userName',
            columns: [[   
                {field:'userName',title:'名称',width:150}               
            ]],  
            fitColumns: true  
        ">
        <span>委托方：</span><input class="easyui-combogrid" id="qClient" style="width: 200px"
            data-options="  
            panelWidth: 200,  
            idField: 'id',  
            textField: 'fullName', 
            columns: [[  
                {field:'fullName',title:'名称',width:200}        
            ]],  
            fitColumns: true  
        ">
        <span>是否退税：</span><select class="easyui-combobox" id="qDrawBack" style="width: 100px;">
            <option value="">所有</option>
            <option value="1">是</option>
            <option value="0">否</option>
        </select>
        <br />
        <br />
        <span>单据状态：</span><select class="easyui-combobox" id="qDeleteFlag" style="width: 100px;">
            <option value="">所有</option>
            <option value="0">正常状态</option>
            <option value="1">取消状态</option>
        </select>
        <span>作业号：</span><input type="text" style="width: 100px" id="qCode">
        <span>提单号：</span><input type="text" style="width: 100px" id="qCCode">
        <span>核销单号：</span><input type="text" style="width: 100px" id="qCheckOffCode">
        <span>柜号：</span><input type="text" style="width: 100px" id="qCaseCode">
        <br />
        <br />
        <a href="#" class="easyui-linkbutton" iconcls="icon-search" plain="true" onclick="doSearch(10,0);">
            搜索</a> <a href="#" class="easyui-linkbutton" iconcls="icon-undo" plain="true" onclick="resetAll();">
                重置</a> <a href="#" class="easyui-linkbutton" iconcls="icon-add" plain="true" onclick="newOrder()">
                    新增</a> <a href="#" class="easyui-linkbutton" iconcls="icon-edit" plain="true" onclick="editOrder()">
                        编辑</a> <a href="#" class="easyui-linkbutton" iconcls="icon-remove" plain="true" onclick="deleteOrder()">
                            删除</a>
    </div>
    <div>
        <table id="tb">
        </table>
    </div>
    <div id="dlg" class="easyui-dialog" style="width: 750px; height: 480px; padding: 10px 10px"
        closed="true" buttons="#dlg-buttons" resizable="true">
        <form id="fm" method="post">
        <div class="ftitle" id="topTitle">
            工作单信息&nbsp;&nbsp;当前环节：订舱&nbsp;&nbsp;单号：HA1304230001</div>
        <div id="tabs" class="easyui-tabs" style="width: 700px; height: 200px">
            <div title="基本信息" style="padding: 10px">
                <table style="border: 0px; padding: 2px; width: 100%">
                    <tr>
                        <td style="text-align: left">
                            接单时间：
                        </td>
                        <td style="text-align: left">
                            <input id="eOrderDate" name="orderTime" class="easyui-datebox" data-options="formatter:DateFormatter,parser:DateParser"
                                style="width: 100px" required="true" />
                        </td>
                        <td style="text-align: left">
                            业务员：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combogrid" id="eBizMan" name="operator" style="width: 150px"
                                data-options="  
            panelWidth: 150,  
            idField: 'id',  
            textField: 'userName',
            columns: [[{field:'userName',title:'名称',width:150}               
            ]],  
            fitColumns: true  
        ">
                        </td>
                        <td style="text-align: left">
                            客服：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combogrid" id="eAgent" name="eAgent" style="width: 150px" data-options="  
            panelWidth: 150,  
            idField: 'id',  
            textField: 'userName', 
            columns: [[   
                {field:'userName',title:'名称',width:150}               
            ]],  
            fitColumns: true  
        ">
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left">
                            委托方：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combogrid" id="eClient" name="client" style="width: 150px" data-options="  
            panelWidth: 150,  
            idField: 'id',  
            textField: 'fullName',  
            columns: [[  
                {field:'fullName',title:'名称',width:150}              
            ]],  
            fitColumns: true  
        ">
                        </td>
                        <td style="text-align: left">
                            发票台头：
                        </td>
                        <td style="text-align: left">
                            <input type="text" id="eInvoiceHeader" name="invoiceHeader" style="width: 150px" />
                        </td>
                        <td style="text-align: left">
                            联系方式：
                        </td>
                        <td style="text-align: left">
                            <input type="text" id="eContactInfo" name="contactInfo" style="width: 150px" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left">
                            提单号：
                        </td>
                        <td style="text-align: left">
                            <input type="text" id="eCCode" name="cCode" style="width: 150px" required="true" />
                        </td>
                        <td style="text-align: left">
                            起运港：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combobox" id="eStartPort" name="startPort" data-options="valueField:'id',textField:'name'"
                                style="width: 150px;">
                        </td>
                        <td style="text-align: left">
                            目的港：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combobox" id="eEndPort" name="endPort" data-options="valueField:'id',textField:'name'"
                                style="width: 150px;">
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left">
                            进出口：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combobox" id="eImptAndExpt" name="imptAndExpt" data-options="valueField:'id',textField:'name'"
                                style="width: 150px;">
                        </td>
                        <td style="text-align: left">
                            截关日期：
                        </td>
                        <td style="text-align: left">
                            <input id="eCustomsDeadline" name="customsDeadline" class="easyui-datebox" data-options="formatter:DateFormatter,parser:DateParser"
                                style="width: 100px" />
                        </td>
                        <td style="text-align: left">
                            装柜形式：
                        </td>
                        <td style="text-align: left">
                            <input class="easyui-combobox" id="eStowageMethod" name="stowageMethod" data-options="valueField:'id',textField:'name'"
                                style="width: 150px;">
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: left">
                            备注：
                        </td>
                        <td style="text-align: left">
                            <textarea cols="15" rows="1" id="eMemo" name="memo"></textarea>
                        </td>
                        <td style="text-align: center" colspan="4">
                            <input type="checkbox" id="eHasTrailer" name="eHasTrailer" />是否拖车&nbsp;&nbsp;<input
                                type="checkbox" id="eHasInvoice" name="hasInvoice" />有无发票&nbsp;&nbsp;<input type="checkbox"
                                    id="eIsCustoms" name="isCustoms" />是否报关&nbsp;&nbsp;<input type="checkbox" id="eIsOcean"
                                        name="isOcean" />是否海运
                        </td>
                    </tr>
                </table>
            </div>
            <div title="拖车信息" style="padding: 10px">
            </div>
            <div title="报关信息" style="padding: 10px">
            </div>
            <div title="货物信息" style="padding: 10px">
            </div>
            <div title="文件信息" style="padding: 10px">
            </div>
            <div title="费用维护" style="padding: 10px">
            </div>
        </div>
        <br />
        <table id="TBWF" class="easyui-datagrid" title="工作流程" style="width: 700px; height: 200px"
            data-options="singleSelect:true,collapsible:true,url:''">
            <thead>
                <tr>
                    <th data-options="field:'FlowStatus',width:90">
                        环节
                    </th>
                    <th data-options="field:'Operator',width:100">
                        处理人
                    </th>
                    <th data-options="field:'HandleText',width:90">
                        处理情况
                    </th>
                    <th data-options="field:'OPTime',width:100,formatter: Common.DateFormatter">
                        处理时间
                    </th>
                    <th data-options="field:'Comment',width:200">
                        处理意见
                    </th>
                    <th data-options="field:'NextOperator',width:100">
                        下一环节处理人
                    </th>
                </tr>
            </thead>
        </table>
        <input type="hidden" id="editId" />
        </form>
    </div>
    <div id="dlg-buttons">
        <a id="btnSaveBase" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-ok"
            onclick="saveOrder()">保存基本信息</a> <a id="btnSaveTC" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-ok" onclick="saveTC()">保存拖车信息</a> <a id="btnDeleteTC" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-remove" onclick="deleteTC()">删除拖车信息</a>
        <a id="btnPrintWTS" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-print"
            onclick="printWTS()">打印派车委托书</a> <a id="btnAddHX" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-add" onclick="AddHX()">添加核销</a> <a id="btnDeleteHX" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-remove" onclick="deleteHX()">删除核销</a>
        <a id="btnSaveBG" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-ok"
            onclick="saveBG()">保存报关信息</a> <a id="btnDeleteBG" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-remove" onclick="deleteBG()">删除报关信息</a> <a id="btnAddXH" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-add" onclick="AddXH()">添加箱号</a>
        <a id="btnDeleteXH" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove"
            onclick="deleteXH()">删除箱号</a> <a id="btnAddHW" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-add" onclick="AddHW()">添加货物</a> <a id="btnDeleteHW" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-remove" onclick="deleteHW()">删除货物</a>
        <a id="btnUpload" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-back"
            onclick="uploadFile()">上传文件</a> <a id="btnDownload" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-reload" onclick="downloadFile()">下载文件</a> <a id="btnDeleteFile" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-remove" onclick="deleteFile()">删除文件</a>
        <a id="btnAddYS" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
            onclick="AddYS()">添加应收</a> <a id="btnDeleteYS" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-remove" onclick="deleteYS()">删除应收</a> <a id="btnAddYF" href="javascript:void(0)"
                    class="easyui-linkbutton" iconcls="icon-add" onclick="AddYF()">添加应付</a>
        <a id="btnDeleteYF" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove"
            onclick="deleteYF()">删除应付</a> <a id="btnClose" href="javascript:void(0)" class="easyui-linkbutton"
                iconcls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭退出</a>
    </div>
</body>
<script type="text/javascript">
    function initBtns() {
        $('#tabs').tabs({
            onSelect: function(title, index) {
                //alert(title + ' is selected;index=' + index);
                $("div#dlg-buttons .easyui-linkbutton").not("#btnClose").hide();
                switch (index) {
                    case 0:
                        $('#btnSaveBase').show();
                        break;
                    case 1:
                        $('#btnSaveTC').show();
                        $('#btnDeleteTC').show();
                        $('#btnPrintWTS').show();
                        break;
                    case 2:
                        $('#btnAddHX').show();
                        $('#btnDeleteHX').show();
                        $('#btnSaveBG').show();
                        $('#btnDeleteBG').show();
                        break;
                    case 3:
                        $('#btnAddXH').show();
                        $('#btnDeleteXH').show();
                        $('#btnAddHW').show();
                        $('#btnDeleteHW').show();
                        break;
                    case 4:
                        $('#btnUpload').show();
                        $('#btnDownload').show();
                        $('#btnDeleteFile').show();
                        break;
                    case 5:
                        $('#btnAddYS').show();
                        $('#btnDeleteYS').show();
                        $('#btnAddYF').show();
                        $('#btnDeleteYF').show();
                        break;
                }
            }
        });
    }

    function newOrder() {
        $('#dlg').dialog('open').dialog('setTitle', '新建工作单');
        resetFrm(false);
    }
    function editOrder() {
        initBtns();
        var row = $('#tb').datagrid('getSelected');
        if (row) {
            $('#dlg').dialog('open').dialog('setTitle', '编辑工作单');
            //$('#fm').form('load', row);
            //url = 'OrderFrm.aspx?id=' + row.id;
            var id = row.OrderId;
            bindBase(id);
            bindFlow(id);
        }
    }

    function saveOrder() {
        var id = $('#editId').val();
        var eOrderDate = $('#eOrderDate').datebox('getValue');
        var eBizMan = $('#eBizMan').combogrid('getValue');
        var eAgent = $('#eAgent').combogrid('getValue');
        var eClient = $('#eClient').combogrid('getValue');
        var eInvoiceHeader = $('#eInvoiceHeader').val();
        var eContactInfo = $('#eContactInfo').val();
        var eCCode = $('#eCCode').val();
        var eStartPort = $('#eStartPort').combobox('getValue');
        var eEndPort = $('#eEndPort').combobox('getValue');
        var eImptAndExpt = $('#eImptAndExpt').combobox('getValue');
        var eCustomsDeadline = $('#eCustomsDeadline').datebox('getValue');
        var eStowageMethod = $('#eStowageMethod').combobox('getValue');
        var eMemo = $('#eMemo').val();
        var eHasTrailer = $('#eHasTrailer').prop("checked");
        var eHasInvoice = $('#eHasInvoice').prop("checked");
        var eIsCustoms = $('#eIsCustoms').prop("checked");
        var eIsOcean = $('#eIsOcean').prop("checked");
        var res = WebApp.OrderFrm.SaveBase(id, eOrderDate, eBizMan, eAgent, eClient, eInvoiceHeader, eContactInfo,
             eCCode, eStartPort, eEndPort, eImptAndExpt, eCustomsDeadline, eStowageMethod, eMemo, eHasTrailer,
             eHasInvoice, eIsCustoms, eIsOcean).value;
        if (res) {
            var data = res.Data;
            var msg = res.Msg;
            if (id) {
                if (data == true)
                    $.messager.alert('消息', '基本信息已更新!', 'info');
                else
                    $.messager.alert('基本信息更新异常', msg, 'error');
            }
            else {
                if (data == true)
                    $.messager.alert('消息', '基本信息已创建!', 'info');
                else
                    $.messager.alert('基本信息创建异常', msg, 'error');
            }
        }
        else
        { $.messager.alert('异常消息', '提交保存异常!', 'error'); }
    }

    function bindBase(id) {
        var res = WebApp.OrderFrm.GetOrderBase(id).value;
        if (res) {
            var data = res.Data;
            var msg = res.Msg;
            if (data) {
                //$('#fm').form('load', data);
                $('#editId').val(id);
                $('#eOrderDate').datebox('setValue', DateFormatter(data.orderTime));
                $('#eBizMan').combogrid('setValue', data.operator);
                $('#eAgent').combogrid('setValue', data.agent);
                $('#eClient').combogrid('setValue', data.client);
                $('#eInvoiceHeader').val(data.invoiceHeader);
                $('#eContactInfo').val(data.contactInfo);
                $('#eCCode').val(data.cCode);
                $('#eStartPort').combobox('setValue', data.startPort);
                $('#eEndPort').combobox('setValue', data.endPort);
                $('#eImptAndExpt').combobox('setValue', data.imptAndExpt);
                $('#eCustomsDeadline').datebox('setValue', DateFormatter(data.customsDeadline));
                $('#eStowageMethod').combobox('setValue', data.stowageMethod);
                $('#eMemo').val(data.memo);
                $('#eHasTrailer').prop("checked", data.hasTrailer);
                $('#eHasInvoice').prop("checked", data.hasInvoice);
                $('#eIsCustoms').prop("checked", data.isCustoms);
                $('#eIsOcean').prop("checked", data.isOcean);
            }
            else {
                $.messager.alert('基本信息获取异常', msg, 'error');
            }
        }
        else
        { $.messager.alert('异常消息', '获取数据异常!', 'error'); }
    }

    function bindTC() { }

    function bindBG() {
        bindHX();
    }

    function bindHX() { }

    function bindXH() { }
    function bindHW() { }

    function bindWJ() { }

    function bindYS() { }

    function bindYF() { }

    function bindFlow(id) {
        $.post('JSONHandler.ashx', {
            DataType: 'WorkFlow',
            OrderId: id
        }, function(theback) {
            $('#TBWF').datagrid('loadData', theback);
        }, "json");
    }
</script>
</html>
